home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / utils / shell / dialog-0.000 / dialog-0 / dialog-0.6c / samples / yesno < prev   
Encoding:
Text File  |  1995-08-07  |  757 b   |  22 lines

  1. #!/bin/sh
  2. DIALOG=${DIALOG=../dialog}
  3.  
  4. $DIALOG --title "YES/NO BOX" --clear \
  5.         --yesno "Hi, this is a yes/no dialog box. You can use this to ask \
  6.                  questions that have an answer of either yes or no. \
  7.                  BTW, do you notice that long lines will be automatically \
  8.                  wrapped around so that they can fit in the box? You can \
  9.                  also control line breaking explicitly by inserting \
  10.                  'backslash n' at any place you like, but in this case, \
  11.                  auto wrap around will be disabled and you will have to \
  12.                  control line breaking yourself." 15 61
  13.  
  14. case $? in
  15.   0)
  16.     echo "Yes chosen.";;
  17.   1)
  18.     echo "No chosen.";;
  19.   255)
  20.     echo "ESC pressed.";;
  21. esac
  22.